package cn.ecnu.pojo.resume;

import cn.ecnu.common.validated.InsertGroup;
import cn.ecnu.common.validated.UpdateGroup;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

@Data
@TableName(value = "resume_skill")
/*求职者-职业技能 */
public class ResumeSkill {

    @TableId(value = "skill_id", type = IdType.AUTO)
//    @Null(message = "数据添加时，skillId不能赋值",groups = InsertGroup.class)
//    @NotNull(message = "数据更新时，skillId不能为空",groups = UpdateGroup.class)
    private Integer skillId;

    @NotNull(message = "userId不能为空")
    private Integer userId;

    @NotEmpty(message = "技能名称不能为空")
    private String skill;

    private String skillDetail;

    @Override
    public String toString() {
        return "{" +
                "技能:" + skill +
                ", 详情:" + skillDetail +
                '}';
    }
}
